﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Webtest.Models
{
    public class Customer
    {
        public int ID { get; set; }
        public string Name { get; set; }
        public List<Book> Books { get; set; }
        public virtual decimal Total()
        {
            decimal total = 0.0M;
            foreach (var x in this.Books)
            {
                total += x.Price;
            }
            return total;
        }
    }
}